\section{Introduction}

Welcome to the first video in my tutorial series on \LaTeX. I'm creating this resource because it's the sort of thing that I would have benefited from when I was a beginning math student. Back then, it was far more difficult to get started with \LaTeX. There were not as many good resources for beginners, and you had to put in a lot of time to get all the packages to work right. Today, there are a lot more resources available, including cloud-based \LaTeX{} processing and discussion boards like \href{https://tex.stackexchange.com/}{\TeX{} Stack Exchange}. However, I have not found a beginner's guide that I've felt was good enough for me to use in my classes with our math majors. And so I'm making this video series to be that resource.

\begin{center}
  \fbox{\includegraphics[width=0.35\linewidth]{img-1-1}}
\end{center}

If I make an error or if you know a better way to do something, please let me know. I'm not claiming to be an expert in \LaTeX, and there is plenty of room for me to learn. Remember that the context of this video series is to get beginners to a place where they can produce basic documents, so I'm intentionally leaving aside some of the more technical options that might be too much for those who are just starting off.

First, let's answer the obvious question: What is \LaTeX? \LaTeX{} is a typesetting program that is used primarily by mathematicians and other academics to help us typeset mathematical notation easily and legibly.

There are two basic ways to use \LaTeX. One is to download a \LaTeX{} package onto your computer. I use the \href{https://www.tug.org/texlive/}{\TeX{} Live} distribution which comes with the \href{https://www.tug.org/texworks/}{\TeX works} document editor. All of this is completely free. I've found the package to be easy for students to work with, and as long as you install everything in the default location, you shouldn't have too many difficulties getting it up and running.

If you're a Mac user, I believe that the \href{https://www.tug.org/mactex/}{Mac\TeX} distribution with \href{https://pages.uoregon.edu/koch/texshop/}{\TeX Shop} is pretty good, though I don't have any personal experience with it.

If you go this route, you may have to spend some time tweaking your settings to get things to run exactly how you want it to run. So for my students that are just getting started, I don't recommend this to them.

Instead, I suggest that they use a cloud-based editor. Specifically, I recommend \href{https://www.overleaf.com/}{Overleaf}.  Overleaf is a free resource that is robust enough for them to use throughout their college careers. You won't need to think about moving to their subscription service unless you want to start doing serious collaborations with others. There are other programs out there, but this is just the one that I've adopted for my students.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-1-2}}
\end{center}

Regardless of which platform you use, you mostly will be working with two windows. One window is your editor. This is where you type in the information that you want \LaTeX{} to process. The second window is your output document. With \TeX works, you won't even have the output window until after you've processed your document for the first time. While \LaTeX{} can generate several different types of output, the primary document type for most people is a PDF file. This is because PDFs are readable on basically every platform.

For each of these videos, I've typed up the transcript in \LaTeX{} and the link to it in Overleaf is in the description. One of the best ways to understand how \LaTeX{} works is to actually look at \LaTeX{} documents. The linked documents will contain things that go beyond these videos. Feel free to copy the code and experiment with it.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-1-3}}
\end{center}

Let's take a look at the structure of a \LaTeX{} document. A \LaTeX{} document has two basic parts. The first part is called the preamble and the second part is the document environment.

The preamble contains commands that establish the basic parameters for the document. We'll discuss some of the available options in a later video.

\begin{itemize}
  \item The \texttt{documentclass} tells \LaTeX\ what type of document you're making, which tells it to load certain features. My default choice for general documents is the article class. If I'm creating a presentation, I'll use the \href{https://ctan.org/pkg/beamer}{\texttt{beamer}} class, and we'll also talk about that one later. There are several other document classes that are available, but these two will get you through most situations when you're first getting started. There's a lot more that can be done here, but we'll leave those options alone for now.
\end{itemize}

After this, we have different packages that will help us make the document we want to make. Packages are files that have extra commands that allow you to do even more with \LaTeX. We will encounter a fair number of these throughout this series, but for now we will focus on the ones that I think are the most fundamental.

\begin{itemize}
  \item The \href{http://texdoc.net/texmf-dist/doc/latex/geometry/geometry.pdf}{\texttt{geometry}} package lets us adjust the margins. This may seem like an odd choice for a fundamental package, but as a student I remember being incredibly bothered by the wide margins that \LaTeX{} uses by default, and bothered by the fact that I couldn't do anything about it. This package would have saved me some frustration.
    \begin{center}
      \fbox{\includegraphics[width=0.55\linewidth]{img-1-4}}
    \end{center}
  \item The \href{http://texdoc.net/texmf-dist/doc/latex/amsmath/amsldoc.pdf}{\texttt{amsmath}} package contains a lot of the magic that makes \LaTeX{} a good choice for typesetting math. This package is maintained by the \href{https://www.ams.org/home/page}{American Mathematical Society} and is used by pretty much everyone. Just trust me that you will always want to use this one whenever you're doing a math document.
  \item The \href{http://texdoc.net/texmf-dist/doc/fonts/amsfonts/amssymb.pdf}{\texttt{amssymb}} package contains a large collection of useful math symbols. Again, if you're doing a math document you should have this package by default.
  \item The \href{http://mirrors.ibiblio.org/CTAN/macros/latex/required/graphics/grfguide.pdf}{\texttt{graphicx}} package is one that I've thrown into this document as a demonstration. We can use the \texttt{graphicx} package to embed JPEGs and PNGs into our \LaTeX{} documents. That type of functionality is not native to \LaTeX, but it was important enough to enough people that someone wrote this package to make it happen.
\end{itemize}

All of the \LaTeX{} packages are free to use. If you are using a standard distribution or a cloud-based program, these packages should already be installed or will install automatically when you need them.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-1-5}}
\end{center}

The document environment is where the actual contents of the document will go. The document environment starts at \verb|\begin{document}| and ends at \verb|\end{document}|. We won't go through the details of the text that's here, but with just some basic observations you can start to get a sense of how \LaTeX{} documents work. For example, this text is centered and drawn with a larger font, and this part corresponds to the image.

The most important thing to understand from this is that all of these backslashes and other symbols are giving \LaTeX{} instructions for how to create the document. The rest of this series is all about learning to communicate with \LaTeX{} so that it does what you want it to do.

In the next video, we are going to focus on different ways we can modify the basic text of a document.